import layoutHeaderAside from '@/layout/header-aside'

const meta = { requiresAuth: true }

export default {
  path: '/resource',
  name: 'resource',
  meta,
  redirect: { name: 'resource-person-index' },
  component: layoutHeaderAside,
  children: (pre => [
    {
      path: 'person/index',
      name: `${pre}person-index`,
      component: () => import('@/pages/demo/page1'),
      meta: { meta, title: '人员' }
    },
    { path: `person/detail`,
      name: `resource-person-detail`,
      component: () => import('@/pages/demo/page2'),
      meta: { meta, title: '人员详情' }
    },
    {
      path: 'person/structure',
      name: `${pre}person-structure`,
      component: () => import('@/pages/demo/business/table'),
      meta: { meta, title: '结构' }
    },
    { path: `structure/detail`,
      name: `resource-structure-detail`,
      component: () => import('@/pages/demo/business/index'),
      meta: { meta, title: '结构详情' }
    },
    {
      path: `management/apply`,
      name: `${pre}management-apply`,
      component: () => import('@/pages/demo/e_apply/apply_list'),
      meta: { meta, title: '设备申请' }
    },
    {
      path: `management/entry`,
      name: `${pre}management-entry`,
      component: () => import('@/pages/demo/e_entry/entry_list'),
      meta: { meta, title: '设备录入' }
    },
    {
      path: `management/applyform`,
      name: `${pre}management-applyform`,
      component: () => import('@/pages/demo/e_apply/index'),
      meta: { meta, title: '设备申请单' }
    },
    {
      path: `management/entryform`,
      name: `${pre}management-entryform`,
      component: () => import('@/pages/demo/e_entry/index'),
      meta: { meta, title: '设备录入单' }
    }
  ])('resource-')
}
